<template>
	<view class="QA">
		<view class="title">
			有问必答
		</view>
		<view class="list">
			<view class="col" v-for="item,index in list" :key="item.id" v-if="item.periodId == periodId">
				<view class="item">
					<view class="info ">
						<image :src="teacharAvatar" mode=""></image>
						<text class="ovh">{{teachar}}</text>
					</view>
					<view class="content">
						<view class="text">
							{{item.title}}
						</view>
						<view class="bottom">
							<text>109人浏览</text>
							<text>9人回答</text>
							<navigator class="btn" :url="`/pages/course/quality/QAdetail?questions_id=`+item.id">
								<text>查看问答</text>
							</navigator>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		props: {
			periodId:{
				type:String
			},
			teachar:{
				type:String
			},
			teacharAvatar:{
				type:String
			},
			list: {
			    type: Array, // 
			    required: true, // 
			    default: () => [] // 
			  }
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.QA {
		background-color: #fff;
		padding: 30rpx 0;
	}

	.title {
		font-size: 36rpx;
		padding: 30rpx;
		font-weight: bold;
	}

	.col {
		padding: 10rpx 0;

		.item {
			box-shadow: 0px 0 12rpx rgba(0, 0, 0, 0.1);
			border-radius: 18rpx;
			padding: 30rpx;
			display: flex;
			align-items: center;

			.info {
				display: flex;
				align-items: center;
				font-size: 24rpx;
				color: #999;
				width: 150rpx;

				image {
					border-radius: 50%;
					width: 60rpx;
					height: 60rpx;
					margin-right: 10rpx;
				}

				text {
					width: calc(100% - 70rpx);
				}
			}

			.content {
				width: calc(100% - 150rpx);

				.text {
					font-size: 28rpx;
					font-weight: bold;
				}

				.bottom {
					display: flex;
					align-items: center;
					justify-content: space-between;
					font-size: 24rpx;
					color: #999;

					.btn {
						font-size: 32rpx;
						width: 180rpx;
						line-height: 80rpx;
						color: #333;
						box-shadow: 0px 3px 6px 0px rgba(81, 199, 108, 0.4);
						text-align: center;

						border-radius: 100px;
					}
				}
			}
		}
	}
</style>